import { getStore } from "../../storage/storage"
import { axios } from "../../utils/axios"

// 获取所有用户
export function getAllConsumer(){
    return axios({
        url: "/user/allUser",
        method: 'get',
        headers: {
            token: getStore("token")
        },
    })
}

// 获取所有企业
export function getAllCompany(){
    return axios({
        url: "/enterprise/getAllCompany",
        method: 'get',
        headers: {
            token: getStore("token")
        },
    })
}

// 获取所有招聘信息
export function getAllRecruitInfo(){
    return axios({
        url: "/recruitment-enterprise/getAllRecruitInfo",
        method: 'get',
        headers: {
            token: getStore("token")
        },
    })
}

// 获取所有求职信息
export function getAllJobInfo(){
    return axios({
        url: "/user-job/getAllJobInfo",
        method: 'get',
        headers: {
            token: getStore("token")
        },
    })
}

// 获取当前登陆的是用户还是管理员还是企业
export function getCurrentLoginRoleName(params){
    return axios({
        url: "/login/getCurrentLoginRoleName",
        method: 'get',
        params: params,
        headers: {
            token: getStore("token")
        },
    })
}

// 得到当前用户发布的求职信息
export function getCurrentUserJobInfo(params){
    return axios({
        url: "/user-job/getCurrentUserJobInfo",
        method: 'get',
        params: params,
        headers: {
            token: getStore("token")
        },
    })
}